vpath %.h include/

study=$(patsubst %.cpp,%, $(wildcard Study*.cpp))

class=$(patsubst %.cpp,%, $(wildcard Class*.cpp))

include=-I./include

main:${study} ${class}

${study}:%:%.cpp
	g++ $< ${include}  -o $@

${class}:%:%.cpp
	g++ $< ${include}  -o $@